[MWPW-199606]Fix intermittent issue of experiment data not fetched for A/B testing#835
Open
Ruchika4 wants to merge 6 commits into
Open
[MWPW-199606]Fix intermittent issue of experiment data not fetched for A/B testing#835Ruchika4 wants to merge 6 commits into
Ruchika4 wants to merge 6 commits into
Conversation
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
|
vipu0303
approved these changes
Jun 26, 2026
| if (isRetry) { | ||
| await this.dispatchErrorToast('warn_fetch_experiment', null, error.message, true, true, { | ||
| code: 'warn_fetch_experiment', | ||
| desc: error.message, |
Collaborator
There was a problem hiding this comment.
do we need to dispatch the error toast in both the cases?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A race condition existed between
workflow-acrobat's page config initialization and Adobe Launch (_satellite) not being ready at page load. When the unity block initialized,ensurePageConfigwas fired fire-and-forget, which fetched page config and immediately calledwindow._satellite.track(...)to retrieve Target experiment data. Since_satelliteloads asynchronously, this call would throw aTypeErrorif Launch hadn't initialized yet. The error was caught and swallowed, leavingexperimentDatapermanentlynullfor that session becausepageConfigFetched = truewas already set, preventing any retry when the user actually uploaded a file.Changes
unitylibs/utils/experiment-provider.jswaitForSatellite()pollswindow._satelliteevery 100ms (up to 5 seconds) before invoking_satellite.track(...)_satelliteis already present, rejects with a clear error on timeoutunitylibs/core/workflow/workflow-acrobat/action-binder.jsensurePageConfigto handle the edge case where_satellitetakes longer than 5 seconds or fails for other reasons!pageConfigin the catch block to distinguish betweenfetchPageConfigfailure vsgetExperimentDatafailure:fetchPageConfigfails → dispatch error to Splunk, return early, keeppageConfigFetched = true(not a transient failure, no retry)getExperimentDatafails → resetpageConfigFetched = falseandpageConfigPromise = nullso the existing|| this.ensurePageConfig()inhandleFileUploadnaturally triggers a fresh attempt when the user uploadsconst isRetry = !!this.pageConfigLocationto detect first attempt vs user-triggered retry error is only dispatched to Splunk on retry, suppressing noise from the recoverable first-attempt failuretest/utils/experiment-provider.test.js/test/core/workflow/workflow-acrobat/action-binder.test.jswaitForSatellitepolling and timeout,ensurePageConfigguard, flag reset without Splunk dispatch on first failure, flag reset with Splunk dispatch on retry, and success paths via bothpageConfig.config.targetandtargetCfg.experimentationOnBehavior After Fix
_satelliteready before page config completes_satellitenot ready within 5sfetchPageConfigitself failsTest plan
_satelliteloads before user interaction (happy path)_satelliteis delayed past the 5s timeoutwarn_fetch_experimentSplunk entry is logged only on retry failure, not on initial page load failureResolves: MWPW-199606
Test URLs: